<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>32.Object方法扩展</title>
</head>
<body>
<script>
  //  Object.is 判断相等
  console.log(Object.is(120,120))//true
  console.log(NaN === NaN)//false
  console.log(Object.is(NaN,NaN))//true

  //Object.assign 合并
  let conf1 ={
      host:'localhost',
      port:8000
  }

  let conf2 = {
      host: '127.0.0.1'
  }

  //合并两者，相同的属性取后面一个对象的值
  let conf = Object.assign(conf1,conf2)
  console.log(conf)



  let city = {
    name:'city'
  }

  let school = {

  }

  //设置原型和获取原型
  Object.setPrototypeOf(school,city)
  console.log(Object.getPrototypeOf(school))
</script>
</body>
</html>